<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>安全生命防护工程--${fns:getConfig('productName')}</title>
<script type="text/javascript" src="${ctx}/scripts/appconfig.jsp" charset="utf-8" ></script>
<%@include file="/common/uihead.jsp" %>
<%@include file="/common/upload.jsp" %>
 <link rel="stylesheet" href="${ctx}/styles/css/jquery.mloading.css">
<script src="${ctx}/js/jquery.mloading.js"></script>
<script src="${ctxStatic}/js/afgc/lifeCherish.js" type="text/javascript"></script>
<link rel="stylesheet" href="${ctxStatic}/stepBar/control.css" type="text/css" />

<link rel="stylesheet" type="text/css" href="${ctxStatic}/step/css/onlinebusinesshall/newexpand/css/index-debug.css">
<link rel="stylesheet" type="text/css" href="${ctxStatic}/step/css/index.css">
<style type="text/css">
.file-actions {
    margin-top: 14px;
}
.kv-file-upload{
	display:none;
}
.modal.fade.in {
    top: 8%;
}
.file-zoom-dialog.modal.fade.in,#publicModal.modal.fade.in{
	top:6%;
}
#publicModal.modal.fade.in{
	left:29%;
}
#result.modal.fade.in{
	top:35%;
	left:50%;
}
.jbox-body *{
z-index:9999 !important;
}
.upFile{
 float:left;
 margin-left:35px;
}
.intro-list-right button{
	float:left;
	margin-left:40px;
}
.ui-jqgrid tr.jqgfirstrow td {
    padding: 0 2px 0 1px;
}
#viewForm .ui-stepBar-wrap .ui-stepBar{
	left:3.5% !important;
}
</style>
<script type="text/javascript">
$("#ifr").load(function(){
	var height = $(this).contents().find("body").height();
});
function openFileModal(){
		$('#myModal').modal({
			keyboard : false,
			backdrop : 'static'
		})
		
}

$(document).ready(function(){
				$("#fileForm").validate({
					debug:true,
					rules: {
					},
					messages: {
					},
					submitHandler:function(form){
						if(checkFileName('file')){
							var title = $('.file-caption-name').attr('title');
							if(!title.endWith('.xls')&&!title.endWith('.xlsx')){
								
								//提示错误信息
		 						$.jBox.tip("文件格式错误！", 'error');
		 						setTimeout("$.jBox.closeTip()", 2000);
							}else{
								$("#myModal").mLoading({
								    text:"正在导入。。。",//加载文字，默认值：加载中...
								    mask:true//是否显示遮罩效果，默认显示
								});
								$('#sub').attr('disabled','disabled');  //防止重复提交，请求完毕之前禁用提交按钮
	 							importExcel();
							}
							
						}
					},
					errorContainer: "#messageBox",
					errorPlacement: function(error, element) {
						$("#messageBox").text("输入有误，请先更正。");
						if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
							error.appendTo(element.parent().parent());
						} else {
							error.insertAfter(element);
						}
					}
				});
				
				$('#myModal').on('hide.bs.modal', function() {
					$(".fileinput-remove-button:first").click(); //清除表单中的文件信息
				});
				$('.file-caption-name').on('DOMNodeInserted',function(){ //重新选择文件之后 让提交按钮可用
					$('#sub').removeAttr('disabled');
			    })

});


function importExcel(){
	var url ='${ctx}/lifeProject/importHigh.do?type=1';
	var formData = new FormData($("#fileForm")[0]);
		$.ajax({
	        async : true,
	        cache : false,
	        type : "post",
	        data : formData,
	        url : url,
	        dataType : 'json',
	        contentType: false, //必须
	        processData: false, //必须 为true的时候 ajax 提交的时候不会序列化 data，而是直接使用data
	        success : function(data) {
	        	//如果是文件模板错误 提示用户重新上传文件  将提交按钮重新启用
	        	//如果是文件内容错误  弹出框供用户下载表格，关闭弹出框或者点击下载之后再让提交按钮重新启用
	        	//如果文件正确，上传成功，提示用户成功导入，关闭模态框，并设施提交按钮可用使用，最后刷新jqgrid 加载数据
	        	if(data.length==1){
	        		$.jBox.tip(data[0].error, 'error');
	        		$('#myModal').mLoading('hide');
					setTimeout("$.jBox.closeTip()", 2000);
	        	} else if(data.length == 2){
	        		$('#myModal').mLoading('hide');
	        		$('#excelDown').attr('href','${ctx}/lifeProject/downloadTemp.do?type=1&fileName='+data[1].filePath);
	        		$('#excelDown').click(function(){
	        			$('#result').modal('hide');
	        		});
	        		$('#result').modal({
	        			keyboard : false,
	        			backdrop : 'static'
	        		})
	        	} else if(data.length == 3){
	        		$('#myModal').mLoading('hide');
	        		$('#myModal').modal('hide');
	        		$.jBox.tip("导入成功！", 'success');
					setTimeout("$.jBox.closeTip()", 2000);
					$("#jqGrid").trigger("reloadGrid");
	        	}

	        },
	        error : function(arg1, arg2, arg3) {
	        }
	    });
}
function dowmTemp(url){
	var fileName = $('#fileName').val();
	url = url+"?fileName="+fileName;
	$('#result').modal('hide');
	//下载表格
	$.ajax({
		type : "POST",
		dataType : "json",
		url : url,
		async: false,
		success : function(data) {
		},
		error:function(data){
		}
	});
}

</script>
</head>
<body>
	<ul class="nav nav-tabs" style="margin:0 4px;margin-bottom: 4px;">
		<c:forEach items="${list}" var="menu"  varStatus="idxStatus">
			<sec:authorize ifAnyGranted="ROLE_${menu.tag}" >
			<li class="${menu.tag eq tag?'active':''}">
				<a href="${ctx}/${menu.href}${fn:indexOf(menu.href, '?') eq -1?'?':'&'}left=${fns:encodeParamUrl(left)}&top=${fns:encodeParamUrl(top)}&parentId=${fns:encodeParamUrl(parentId)}&LId=${fns:encodeParamUrl(LId)}&filter_EQS_tag=${menu.tag}">
					<i class="icon icon-list" style="margin-right:10px"></i><span>${menu.name}</span>
				</a>
			</li>
			</sec:authorize>
		</c:forEach>
	</ul>
	<input type='hidden' name="" id="userRole" value="${roleType}">
	<form id="mainForm" class="form-horizontal" role="form" method="get" name="mainForm" style="">
		<div class="breadcrumb form-search" style="background-color: #f5f5f5;">
			<div>
				<label>关键字:</label> <input type="text" oninput="queryForGrid('mainForm','jqGrid')" onporpertychange="queryForGrid('mainForm','jqGrid')"
					name="filter_LIKES_roadCode_OR_projectYear_OR_county"
					value="${filter_LIKES_roadCode_OR_projectYear_OR_county}"
					placeholder="防护工程查询" />
					<c:if test="${fns:endStr(tag, '_gczl')}">
					<sec:authorize ifAnyGranted="ROLE_afgcfirst_export" >
						<a href="javascript:void(0)" onclick= "openFileModal()"  class="btn btn-primary" role="button" >导入数据</a>
						<a href="${ctx}/lifeProject/download.do?type=1" class="btn btn-primary" role="button" >下载模板</a>
					</sec:authorize>
					</c:if>
			</div>
			
		</div>
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</form>
	<form id="fileForm" name="fileForm">
		<input type="hidden" name="attId" id="attId" value="">
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static" style="width:820px;max-height:700px">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">导入安防一二级工程</h4>
						</div>
						<div class="modal-body" style="max-height:670px;">
							<input id="file-0a" class="file" name="file" type="file" multiple data-min-file-count="1"> 
						</div>
						<div style="padding:4px 15px 15px">
				提示：<span style="color:red">请选择.xls或者.xlsx文件</span>
			</div>
						<div class="modal-footer" style="padding:4px 15px 5px;">
							<button type="button" class="btn btn-default" data-dismiss="close">关闭</button>
							<button type="submit" class="btn btn-primary" id="sub">提交</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal -->
			</div>
			
	</form>
	<div class="modal fade" id="result" tabindex="-1" role="dialog" aria-labelledby="resultLabel" aria-hidden="true" data-backdrop="static" style="width:550px;max-height:700px">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-hidden="true">&times;</button>
							<h4 class="modal-title" id="myModalLabel">导入结果</h4>
						</div>
						<div class="modal-body" style="max-height:670px;">
							<span>导入失败：</span><label style="color:red">表格中内容有误，请修改表格内的内容之后再选择上传</label>
							<a href="" id="excelDown">表格下载</a>
						</div>
					</div>
				</div>
	</div>
	
	<form id="publicForm" name="publicForm">
   <input type="hidden" name="id" id="id" value="">
   <input type="hidden" name="tag" id="tag" value="${tag}">
   <input type="hidden" name="delStatus" id="delStatus" value="">
   <input type='hidden' name="currentStatus" id="currentStatus" value="">
   <input type='hidden' name="refuseStatus" id="refuseStatus" value="">
<div class="modal fade" id="publicModal" tabindex="-1" role="dialog" aria-labelledby="publicModal" aria-hidden="true" data-backdrop="static" style="width:1200px;max-height:700px;">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">修改工程信息</h4>
					</div>
					<div class="modal-body" style="max-height:650px;" id='publicBody'>
						<div id="stepBar" class="ui-stepBar-wrap">
							<div class="ui-stepBar">
								<div class="ui-stepProcess"></div>
							</div>
							<div class="ui-stepInfo-wrap">
								<table class="ui-stepLayout" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">1</a>
											<p class="ui-stepName">未处置&nbsp;&nbsp;</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">2</a>
											<p class="ui-stepName">实施计划</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">3</a>
											<p class="ui-stepName">工程设计</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">4</a>
											<p class="ui-stepName">工程实施</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">5</a>
											<p class="ui-stepName">工程验收</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">6</a>
											<p class="ui-stepName">工程评论</p>
										</td>
									</tr>
								</table>
								
							</div>
						</div>
						<h4 style="margin-top:10px;">处置措施:</h4>
						<hr>
						<table class="table"  style="border: none;margin-bottom: -14px">
							<tbody>
								<tr>
									<td>涉及路线参数调整的土建工程:</td>
									<td>
										<pt:code name="involvingProject" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
									<td>路域环境整治:</td>
									<td>
										<pt:code name="roadEnvironment" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
									<td >标志线处置:</td>
									<td >
										<pt:code name="markLineDisposal" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
								</tr>
								<tr>
									<td >交叉口综合处置:</td>
									<td >
										<pt:code name="comprehensive" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
									<td >加装护栏:</td>
									<td >
										<pt:code name="installingGuardrail" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
									<td >警示诱导设施处置:</td>
									<td>
										<pt:code name="inducedDisposal" category="1002" hasEmpty="false" default=""></pt:code>
									</td>
								</tr>
								<tr>
									<td >其　　他:</td>
									<td colspan="5">
										<div class="wordCount wyInline" id="wordCount" >
											<textarea placeholder="其他处置措施" rows='1' id="otherMeasures" style="height:40px;"
												name="otherMeasures"></textarea>
												<input type='hidden' name='remark' id='remark' value=''/>
											<span class="wordwrap"><var class="word">200</var>/200</span>
										</div>
									</td>
								</tr>
								<tr id="contentTr" style="display:none">
									<td >工程评价:</td>
									<td colspan="5">
										<div class="wordCount wyInline" id="contentWord" >
											<textarea placeholder="" rows='1' id="content" style="height:40px;"
												name="content"></textarea>
											<span class="wordwrap"><var class="word">2000</var>/2000</span>
										</div>
									</td>
								</tr>
								<tr >
									<td >操作记录:</td>
									<td colspan="5">
										<div id='operate'>
											
										</div>
									</td>
								</tr>
							</tbody>
						</table>

						<div style="width:100%;border:1px solid #ccc;margin-top:15px;">
							<iframe frameborder=0 width=100% width=100%  id="ifr" src=""></iframe>
						</div>
					</div>
					<div class="modal-footer" style="padding:4px 15px 5px;">
						<button type="button" class="btn btn-default" data-dismiss="close">关闭</button>
						<button type="button" class="btn btn-primary" id="subPublic" onclick="projectSubmit('${ctx}/lifeProject/save.do','${roleType}');" >下一步</button>
						<button type="button" class="btn btn-primary" id="subApply" onclick="apply('${ctx}/lifeProject/save.do','${roleType}');"  style="display:none">申请验收</button>
						<button type="button" class="btn btn-primary" id="subAgree" onclick="agree('${ctx}/lifeProject/save.do','${roleType}');"  style="display:none">同意验收</button>
						<button type="button" class="btn btn-primary" id="subRefuse" onclick="refuse('${ctx}/lifeProject/save.do','${roleType}');" style="display:none" >拒绝验收</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
</form>

<!-- 查看modal -->
<form id="viewForm" name="viewForm" >
<div class="modal fade" id="viewModal" tabindex="-1" role="dialog" aria-labelledby="viewModal" aria-hidden="true" data-backdrop="static" style="width:1220px;max-height:600px;">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">查看工程信息</h4>
					</div>
					<div class="modal-body" style="max-height:518px;">
					<div id="stepBar1" class="ui-stepBar-wrap">
							<div class="ui-stepBar">
								<div class="ui-stepProcess"></div>
							</div>
							<div class="ui-stepInfo-wrap">
								<table class="ui-stepLayout" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">1</a>
											<p class="ui-stepName">基本信息</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">2</a>
											<p class="ui-stepName">公路条件信息</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">3</a>
											<p class="ui-stepName">路段既有安全设施信息</p>
										</td>
										<td class="ui-stepInfo">
											<a class="ui-stepSequence">4</a>
											<p class="ui-stepName">新采取的处置措施</p>
										</td>
									</tr>
								</table>
								
							</div>
						</div>
						<div id='info-1' class='info'>
						<h4 style="margin-top:10px;">基本信息:</h4><hr>
						<table class="table"  style="border: none;margin-bottom: -14px">
							<tbody>
								<tr>
									<td>省:</td>
									<td>
										<input name="province" id="province" type='text' value="" disabled=disabled>
									</td>
									<td>市:</td>
									<td>
										<input name="city" id="city" type='text' value="" disabled=disabled>
									</td>
									<td >县:</td>
									<td >
										<pt:code name="county" category="2052" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td >公路编号:</td>
									<td >
										<input name="roadCode" id="roadCode" type='text' value=""  disabled=disabled>
									</td>
								</tr>
								<tr>
									<td >技术等级:</td>
									<td >
										<pt:code name="technicalLevel" category="6000" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >方向:</td>
									<td>
										<pt:code name="direction" category="6001" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td > 桩号起点:</td>
									<td >
										<input name="startPegNum" id="startPegNum" type='text' value="" disabled=disabled>
									</td>
									<td >桩号终点:</td>
									<td >
										<input name="endPegNum" id="endPegNum" type='text' value=""   disabled=disabled>
									</td>
								</tr>
								<tr>
									<td >排查时间:</td>
									<td>
										<input name="investigationTime" id="investigationTime" type='text' value=""  disabled=disabled>
									</td>
									<td >  路段分类:</td>
									<td >
										<pt:code name="roadType" category="6002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >交通事故排查方法:</td>
									<td >
										<pt:code name="investigationMethod" category="6003" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td > 是否是事故多发点段:</td>
									<td>
										<pt:code name="accidentArea" category="6004" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
								</tr>
								<tr>
									<td > 公路条件排查方法:</td>
									<td >
										<pt:code name="conditionInvestigation" category="6003" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >高公路风险路段:</td>
									<td >
										<pt:code name="highRiskSection" category="6004" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >当前状态</td>
									<td>
										<pt:code name="currentStatus" category="6006" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td ></td>
									<td>
									</td>
									
								</tr>
							</tbody>
						</table>
						<hr>
						</div>
						<div id='info-2' class='info' style="display:none">
						<h4 style="margin-top:10px;">公路条件信息:</h4><hr>
						<table class="table"  style="border: none;margin-bottom: -14px">
							<tbody>
								<tr>
									<td>小半径圆曲线:</td>
									<td>
										<pt:code name="radiusCurve" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td>连续下坡:</td>
									<td>
										<pt:code name="continuousDescent" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td > 陡坡:</td>
									<td >
										<pt:code name="steepSlope" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td >视距不良:</td>
									<td >
										<pt:code name="poorSight" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
								</tr>
								<tr>
									<td >路测险要:</td>
									<td >
										<pt:code name="roadTest" category="1000" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >环境复杂:</td>
									<td>
										<pt:code name="complexEnvironment" category="1000" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td > 交叉口不规范:</td>
									<td >
										<pt:code name="standard" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td >符合同行校车判别指标:</td>
									<td >
										<pt:code name="schoolBus" category="1000" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
								</tr>
								<tr>
									<td >交通量（AATD）:</td>
									<td>
										<input name="traffic" id="traffic" type='text' value=""   disabled=disabled>
									</td>
									<td>  运行车速或设计速度(km/h):</td>
									<td>
										<input name="designSpeed" id="designSpeed" type='text' value="" disabled=disabled>
									</td>
									<td></td>
									<td>
									</td>
									<td></td>
									<td>
									</td>
								</tr>
								
							</tbody>
						</table>
						<hr>
						</div>
						<div id='info-3' class='info' style="display:none">
						<h4 style="margin-top:10px;">路段既有安全设施信息:</h4><hr>
						<table class="table"  style="border: none;margin-bottom: -14px">
							<tbody>
								<tr>
									<td>护栏:</td>
									<td>
										<pt:code name="guardrail" category="1002" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td>标志标线:</td>
									<td>
										<pt:code name="markMarking" category="1002" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td > 警示和视线诱导设施:</td>
									<td >
										<pt:code name="guidanceFacility" category="1002" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
									<td >路段设施其他信息:</td>
									<td >
										<input name="otherInfo" id="otherInfo" type='text' value=""  disabled=disabled>
									</td>
								</tr>
						</tbody>
						</table>
						<hr>
						</div>
						<div id='info-4' class='info' style="display:none">
						<h4 style="margin-top:10px;">处置措施:</h4>
						<hr>
						<table class="table"  style="border: none;margin-bottom: -14px">
							<tbody>
								<tr>
									<td>涉及路线参数调整的土建工程:</td>
									<td>
										<pt:code name="involvingProject" category="1002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td>路域环境整治:</td>
									<td>
										<pt:code name="roadEnvironment" category="1002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >标志线处置:</td>
									<td >
										<pt:code name="markLineDisposal" category="1002" hasEmpty="false" default="" disabled="true" ></pt:code>
									</td>
								</tr>
								<tr>
									<td >交叉口综合处置:</td>
									<td >
										<pt:code name="comprehensive" category="1002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >加装护栏:</td>
									<td >
										<pt:code name="installingGuardrail" category="1002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
									<td >警示诱导设施处置:</td>
									<td>
										<pt:code name="inducedDisposal" category="1002" hasEmpty="false" default="" disabled="true"></pt:code>
									</td>
								</tr>
								<tr>
									<td >其　　他:</td>
									<td>
											<textarea placeholder="" rows='1' id="otherMeasures" style="height:40px;" readonly = readonly
												name="otherMeasures"></textarea>
										</div>
									</td>
									<td >处置投资估算(万元):</td>
									<td >
										<input name="investmentEstimation" id="investmentEstimation" type='text' value=""  disabled=disabled>
									</td>
									<td >计划实施安防工程年份:</td>
									<td >
										<input name="projectYear" id="projectYear" type='text' value=""  disabled=disabled>
									</td>
								</tr>
								<tr>
									<td >工程评价:</td>
									<td colspan="3">
											<textarea placeholder="" rows='1' id="content" style="height:40px;width:95%" readonly = readonly
												name="content"></textarea>
									</td>
									<td ></td>
									<td ></td>
								</tr>
								<tr >
									<td >操作记录:</td>
									<td colspan="5">
										<div id='opr'>
											
										</div>
									</td>
								</tr>
								<tr >
									<td id="aboutFiles">相关文件:<br/>
									</td>
									<td colspan="5">
										<div id='optFile'>
											
										</div>
									</td>
								</tr>
							</tbody>
						</table>
						</div>
					</div>
					<div class="modal-footer" style="padding:4px 15px 5px;">
						<button type="button" class="btn btn-default" data-dismiss="close">关闭</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal -->
		</div>
</form>
<script type="text/javascript">
		var delStatus = getQueryString("delStatus");
		var roleType = ${roleType};
		$(document).ready(function()
		{
			var jqgridH =  $(window).height()-380;
			$("#jqGrid").jqGrid(
			{ url : '${ctx}/lifeProject/list.do?filter_ORS_technicalLevel=1;2&delStatus='+delStatus,
			  mtype : "GET",
			  datatype : "json",
			  page : 1,
			  viewrecords: true,
			  colModel:[
				{ label : "操作", name : "id", 
					  width : 120,   align : 'center', sortable : false, search : false ,
					  formatter: function (cellValue, options, rowObject){
						  var content="";
						  var editor ="<a href='javascript:void(0);' onclick='updateProject(\"" + cellValue
							+ "\",\"${ctx}/lifeProject/show.do\",\""+roleType+"\");' id='" + cellValue
							+ "'  title='修改'><i class='icon icon-edit' style='margin-top:4px;'></i>&nbsp;修改</a>";
						  if(roleType=="4"){
							  
						  } else if(rowObject['delStatus']=='0' && rowObject['currentStatus']=='0' &&(roleType =="1"||roleType=="3") ){
							  <sec:authorize ifAnyGranted="ROLE_afgcfirst_editor" >						  
							  	content += editor;
							  </sec:authorize>
						  } else if(rowObject['delStatus']=='2' && rowObject['currentStatus']=='5' ){
							  
						  } else if(rowObject['delStatus']=='1' && (rowObject['currentStatus']=='1' || rowObject['currentStatus']=='2' || rowObject['currentStatus']=='3'|| rowObject['currentStatus']=='4')&&(roleType=="1" || roleType =="3")){
							  <sec:authorize ifAnyGranted="ROLE_afgcfirst_editor" >						  
							  	content += editor;
							  </sec:authorize>
						  } else{
							  if(roleType=="2" && rowObject['delStatus']=='1'&&  rowObject['currentStatus']=='5'){
								  
							  } else if((roleType=="1" || roleType =="3") && rowObject['delStatus']=='1'&&  rowObject['currentStatus']=='5'){
								  <sec:authorize ifAnyGranted="ROLE_afgcfirst_editor" >						  
								  	content += editor;
								  </sec:authorize>
							  }
						  }
						  content +="<a href='javascript:void(0);' onclick='viewProject(\"" + cellValue+ "\",\"${ctx}/lifeProject/showView.do\");'><i class='icon-eye' style='margin-top:2px;'></i>&nbsp;查看</a>";
						  return content;
					  }
				},
				{
           	        label: '处理状态',
           	        name: 'currentStatus',
           	     	align:'center',
           	        width: 80,
           	    	sortable : false,
           	     	formatter:function(cellValue, options, rowObject){
           	     		if(rowObject['delStatus']=='2'){
           	     			return "<span style='color:green'>已验收 </span>";
           	     		} else if(rowObject['refuseStatus']=='1'){
           	     			return "<span style='color:red'>拒绝验收</span>";
						} else if(rowObject['delStatus']=='0'){
							return "<span style='color:darkorange'>未处置</span>";
						} else {
           	     			return  "<span style='color:violet'>"+Pengtu.buildCodeName(6006,cellValue)+"</span>";
           	     		}
	                 	
	                }
                },
				{
           	        label: '处理状态',
           	        name: 'delStatus',
           	     	align:'center',
           	     	hidden:true,
           	        width: 80,
           	        
                },
				{
           	        label: '拒绝验收状态',
           	        name: 'refuseStatus',
           	     	align:'center',
           	     	hidden:true,
           	        width: 80
                },
//                 {
//            	        label: '省',
//            	        name: 'province',
//            	     	align:'center',
//            	        width: 80
//                 },{
//            	        label: '市',
//            	        name: 'city',
//            	     	align:'center',
//            	        width: 120
//                 },
                {
           	        label: '县',
           	        name: 'county',
           	     	align:'center',
           	        width: 100,
           	     	sortable : false,
	           	    formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(2052,cellValue);
	                }
                },{
           	        label: '公路编号',
           	        name: 'roadCode',
           	     	align:'center',
           	        width: 100
                },{
           	        label: '技术等级',
           	        name: 'technicalLevel',
           	     	align:'center',
           	        width: 100,
           	     	sortable : false,
           	    	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6000,cellValue);
	                }
                },{
           	        label: '方向',
           	        name: 'direction',
           	     	align:'center',
           	        width: 120,
           	    	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6001,cellValue);
	                }
                },{
           	        label: '起点桩号',
           	        name: 'startPegNum',
           	     	align:'center',
           	        width: 100,
           	     	formatter:function(cellValue){
           	     		return dateChange(cellValue);
	                }
                },{
           	        label: '终点桩号',
           	        name: 'endPegNum',
           	     	align:'center',
           	        width: 100,
           	     	formatter:function(cellValue){
        	     		return dateChange(cellValue);
	                }
                },{
           	        label: '排查时间',
           	        name: 'investigationTime',
           	     	align:'center',
           	        width: 100
                },{
           	        label: '路段分类',
           	        name: 'roadType',
           	     	align:'center',
           	        width:80,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6002,cellValue+"");
	                }
                },{
           	        label: '交通事故排查方法',
           	        name: 'investigationMethod',
           	     	align:'center',
           	        width: 120,
           	    	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6003,cellValue+"");
	                }
                },{
           	        label: '交通事故风险等级或是否事故多发点',
           	        name: 'accidentArea',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6004,cellValue+"");
	                }
                },{
           	        label: '公路条件排查方法',
           	        name: 'conditionInvestigation',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6003,cellValue+"");
	                }
                },{
           	        label: '是否是高公路风险路段',
           	        name: 'highRiskSection',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(6004,cellValue+"");
	                }
                },{
           	        label: '小半径圆曲线',
           	        name: 'radiusCurve',
           	     	align:'center',
           	        width: 120,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '连续下坡',
           	        name: 'continuousDescent',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '陡坡',
           	        name: 'steepSlope',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '视距不良',
           	        name: 'poorSight',
           	     	align:'center',
           	        width: 120,
           	    	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '路侧险要',
           	        name: 'roadTest',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '环境复杂',
           	        name: 'complexEnvironment',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '交叉口不规范',
           	        name: 'standard',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '交通量（AADT）',
           	        name: 'traffic',
           	     	align:'center',
           	        width: 120
                },{
           	        label: '通行校车或班线车',
           	        name: 'schoolBus',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1000,cellValue+"");
	                }
                },{
           	        label: '设计速度（km/h）',
           	        name: 'designSpeed',
           	     	align:'center',
           	        width: 120
                },{
           	        label: '护栏',
           	        name: 'guardrail',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '标志标线',
           	        name: 'markMarking',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '警示和视线诱导设施',
           	        name: 'guidanceFacility',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '路段设施其他信息',
           	        name: 'otherInfo',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
                },{
           	        label: '涉及路线参数调整的土建工程',
           	        name: 'involvingProject',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '路域环境整治',
           	        name: 'roadEnvironment',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '标志线处置',
           	        name: 'markLineDisposal',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '交叉口综合处置',
           	        name: 'comprehensive',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '加装护栏',
           	        name: 'installingGuardrail',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '警示诱导设施处置',
           	        name: 'inducedDisposal',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
           	     	formatter:function(cellValue){
	                 	return Pengtu.buildCodeName(1002,cellValue+"");
	                }
                },{
           	        label: '其他处置措施',
           	        name: 'otherMeasures',
           	     	align:'center',
           	        width: 120,
           	     	sortable : false,
                },{
           	        label: '处置投资估算（万元）',
           	        name: 'investmentEstimation',
           	     	align:'center',
           	        width: 120
                },{
           	        label: '计划实施年份',
           	        name: 'projectYear',
           	     	align:'center',
           	        width: 120
                }
						],
			autowidth : false,width:$(window).width()-248,  height : jqgridH,scrollOffset:0, shrinkToFit : 400, rowNum : 10, viewrecords : true, rownumbers : true,
			jsonReader:{
    			root: "result",
    			page: "currentPage",
    			total: "totalPages",
    			records: "totalCount",
    			repeatitems: true,
    			cell: "cell",
    			id: "id",
    			userdata: "userdata",
    			subgrid: {root:"results", repeatitems: true, cell:"cell"}
    		},
    		prmNames: {
				page:"pageNo",
				rows:"pageSize",
				sort: "orderBy",
				order: "order",
				search:"_search",
				nd:"nd", id:"id",
				oper:"oper",
				editoper:"edit",
				addoper:"add",
				deloper:"del",
				subgridid:"id",
				npage: null,
				totalrows:"totalCounts"
			}, 
			rowList :[10,20,30], 
			pager : "#jqGridPager"
			});
		 $("#jqGrid").jqGrid( 'setGroupHeaders' , {
	   		useColSpanStyle : true,  // 没有表头的列是否与表头列位置的空单元格合并
	   		groupHeaders : [
				{
			   startColumnName :  'county' ,  // 对应colModel中的name
			   numberOfColumns : 12,  // 跨越的列数
			   titleText :  '基本信息'
			   },
	   		   {
	   		   startColumnName :  'radiusCurve' ,  // 对应colModel中的name
	   		   numberOfColumns : 10,  // 跨越的列数
	   		   titleText :  '公路条件信息'
	   		   },
	   		   {
		   		   startColumnName :  'guardrail' ,  // 对应colModel中的name
		   		   numberOfColumns : 4,  // 跨越的列数
		   		   titleText :  '路段既有安全设施信息'
		   	   },
	   			{
		   		   startColumnName :  'involvingProject' ,  // 对应colModel中的name
		   		   numberOfColumns : 7,  // 跨越的列数
		   		   titleText :  '拟新采取的处置措施'
		   	   }
	   		]
	   		});
		});
//add
if($(window).height()<768){
	$(".modal-body").css({"max-height":"400px"});
}else{
	$(".modal-body").css({"max-height":"518px"});	
}
</script>
<script src="${ctxStatic}/stepBar/stepBar.js" type="text/javascript"></script>
</body>
</html>